package com.kgc.basic.remote;

import com.kgc.basic.pojo.GoodsCategory;
import com.kgc.basic.pojo.Store;
import com.kgc.basic.util.ResponseMsg;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

public interface GoodsCategoryRemote {
    //根据条件查询商品分类信息
    @RequestMapping("getGoodsCategoryList")
    @ResponseBody
    ResponseMsg getGoodsCategoryList(@RequestBody Map<String,Object> paramMap);

    //根据id查询商品分类信息
    @RequestMapping("getGoodsCategoryById")
    @ResponseBody
    ResponseMsg getGoodsCategoryById(@RequestParam("id") Integer id);

    //根据name查询商品分类信息
    @RequestMapping("getGoodsCategoryByName")
    @ResponseBody
    ResponseMsg getGoodsCategoryByName(@RequestParam("name") String name);

    //根据code查询商品分类信息
    @RequestMapping("getGoodsCategoryByCode")
    @ResponseBody
    ResponseMsg getGoodsCategoryByCode(@RequestParam("code") String code);

    //新增商品分类信息
    @RequestMapping("addGoodsCategory")
    @ResponseBody
    ResponseMsg addGoodsCategory(@RequestBody GoodsCategory goodsCategory);

    //更新商品分类信息
    @RequestMapping("modifyGoodsCategory")
    @ResponseBody
    ResponseMsg modifyGoodsCategory(@RequestBody GoodsCategory goodsCategory);

    //删除商品分类信息
    @RequestMapping("delGoodsCategory")
    @ResponseBody
    ResponseMsg delGoodsCategory(@RequestParam("id") Integer id);

    //以树形展示所有商品分类数据
    @RequestMapping("showGoodsCategoryByTree")
    @ResponseBody
    ResponseMsg showGoodsCategoryByTree();

    //根据parentId查询商品分类信息
    @RequestMapping("getGoodsCategoryByParentId")
    @ResponseBody
    ResponseMsg getGoodsCategoryByParentId(@RequestParam("parentId") Integer parentId);
}
